<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    
    <body>
        <div id="app" >
            <img :src="img" alt="">
        </div>
        <!--导包一定要双标签，不能单标签-->
        <script src="./node_modules/vue/dist/vue.js"></script>

        <script type="text/javascript">

            var vue = new Vue({
                el:"#app",
                data:{
                    images:[
                        "imgs/1.jpg",
                        "imgs/2.jpg",
                        "imgs/3.jpg",
                        "imgs/4.jpg",
                        "imgs/5.jpg",
                        "imgs/6.jpg",
                    ],
                    img:'imgs/1.jpg'
                },
                created() {
                    var i=0;
                    setInterval(() => {
                        this.img=this.images[i];
                        i++;
                        if (i == this.images.length) {
                            i = 0;
                        }
                    },1000)
                }


            })
        </script>
    </body>
</html>